package com.zx.feign;


import com.zx.common.ResponseCommon;
import com.zx.vo.BalanceInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
/*不需要熔断的商品接口服务
 * 当value也就是nacos服务出现了多次的时候 一定要指定一个contextId作为区分
 * */
@FeignClient(value = "account-service",contextId = "not-secured-account")
public interface NotSecuredBalanceClient {
    /**
     * 根据用户id和扣减余额进行余额处理
     * @param balanceInfo
     * @return
     */
    @PostMapping("/account-service/balance/deduct-balance")
    ResponseCommon<BalanceInfo> deductBalance(@RequestBody BalanceInfo balanceInfo);
}
